#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QIcon>
#include <QPainter>
#include <QPushButton>
#include <QMovie>
#include <QLabel>
#include <QMouseEvent>
#include <QTextEdit>
#include <QFile>
#include <QTextStream>
#include <windows.h>
#include <QDesktopServices>
#include <QMessageBox>
#include <QProcess>
#include <QDebug>
#include <QUrl>

#include "http.h"
#include "dashcheckiso.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    bool m_Drag;
    QPoint m_DragPosition;
    virtual void mousePressEvent(QMouseEvent *event);
    virtual void mouseMoveEvent(QMouseEvent *event);
    virtual void mouseReleaseEvent(QMouseEvent *);

    int page=1;



    //1:欢迎页面
    //2:用户协议
    //3:选择镜像源
    //41:云端模式
    //42:本地模式



    bool mode;//0表示云端，1表示本地
    void hideAllUi();
    void turnHome();
    void turnSet();
    void turnMode();
    void turnCloud();
    void turnLocal();

    //QProcess *EasyDown;

    //QTextEdit *textAgreement=new QTextEdit(this);

private slots:
    void on_buttonStart_clicked(bool checked);

    void on_buttonBack_clicked(bool checked);

    void on_buttonAgLink_clicked(bool checked);

    void on_buttonAg_clicked(bool checked);

    void on_buttonClose_clicked(bool checked);

    //void showDownload();

    void on_buttonCloud_clicked(bool checked);

    void on_buttonLocal_clicked(bool checked);

private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
